<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<title>动态显示系统时间</title>
	<style type="text/css">
		body {
			width: 913px;
			margin: 0px auto;
		}

		.main {
			font-family: "黑体";
			font-size: 25px;
			color: #CC0000;
		}

		.clock {
			font-size: 50px;
			color: #CC0000;
			border-style: none
		}
	</style>
	<script type="text/javascript">
		function disptime() {
			var dates = new Date();
			var h = dates.getHours();
			var m = dates.getMinutes();
			var s = dates.getSeconds();
			document.getElementById("time").value = h + ":" + m + ":" + s;
			setTimeout("disptime()", 1000);
		}
		window.onload = disptime;
	</script>
</head>

<body onload="disptime()">
	<div class="top">
		<img src="images/banner.png" alt="banner" />
	</div>
	<div class="main">
		当前系统时间：<input class="clock" type="text" id="time" />
	</div>
</body>

</html>